import request from '@/utils/request'

// 查询学习园地列表
export function listGarden(query) {
  return request({
    url: '/system/garden/list',
    method: 'get',
    params: query
  })
}

// 查询学习园地详细
export function getGarden(learningGardenId) {
  return request({
    url: '/system/garden/' + learningGardenId,
    method: 'get'
  })
}

// 新增学习园地
export function addGarden(data) {
  return request({
    url: '/system/garden',
    method: 'post',
    data: data
  })
}

// 修改学习园地
export function updateGarden(data) {
  return request({
    url: '/system/garden',
    method: 'put',
    data: data
  })
}

// 删除学习园地
export function delGarden(learningGardenId) {
  return request({
    url: '/system/garden/' + learningGardenId,
    method: 'delete'
  })
}
